import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import router from './router'
import { getItem, removeItem } from '@/utils/save'

NProgress.configure({ showSpinner: false })// NProgress Configuration

router.beforeEach(async(to, from, next) => {
  // if (from.name == null) return
  NProgress.start()
  next()
  // console.log("---beforeEach-",  to, from)

  NProgress.done()
})

router.afterEach(() => {
  NProgress.done()
})